#SET(CMAKE_C_COMPILER mingw32-gcc-4.2.1-dw2.exe)
# For eclipse CDT to display error message better
IF(CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
ENDIF(CMAKE_COMPILER_IS_GNUCC)

SET(PARTICLE_SRCS
	phypos.c
	trunk_read.c
	trunk_write.c
	trunk_privutils.c
	soffset.c
	memory.c
	logger.c)

IF(CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]")
	LIST(APPEND COMPILE_FLAGS "-O0 -Wall -W")
	ADD_DEFINITIONS(-DDEBUG)
ENDIF(CMAKE_BUILD_TYPE)

ADD_EXECUTABLE(particle ${PARTICLE_SRCS} particle.c )
ADD_EXECUTABLE(soffset ${PARTICLE_SRCS} testing/t_soffset.c)

#INCLUDE(Dart)
#INCLUDE(CTest)
ENABLE_TESTING()
#ADD_TEST(simpletest ${EXECUTABLE_OUTPUT_PATH}/particle lcgong)